package org.mch.swingm.obj;

import org.mch.comm.lang.MBoolean;

public class MItem {

	private String name;

	private String key;

	private MBoolean ishide;

	private MBoolean isedit;

	private String hint;

	private int textwidth = 100;

	public MItem() {
		super();
		this.ishide = new MBoolean(false);
		this.isedit = new MBoolean(true);
	}

	public MItem(String name) {
		super();
		this.key = name;
		this.name = name;
		this.hint = name;
		this.ishide = new MBoolean(false);
		this.isedit = new MBoolean(true);
	}

	public MItem(String key, String name) {
		super();
		this.key = key;
		this.name = name;
		this.hint = name;
		this.ishide = new MBoolean(false);
		this.isedit = new MBoolean(true);
	}

	public MItem(String key, String name, boolean ishide, boolean isedit) {
		super();
		this.key = key;
		this.name = name;
		this.hint = name;
		this.ishide = new MBoolean(ishide);
		this.isedit = new MBoolean(isedit);
	}

	public MItem(String key, String name, boolean ishide, boolean isedit, int textwidth) {
		super();
		this.key = key;
		this.name = name;
		this.hint = name;
		this.ishide = new MBoolean(ishide);
		this.isedit = new MBoolean(isedit);
		this.textwidth = textwidth;
	}

	public int getTextwidth() {
		return textwidth;
	}

	public MItem setTextwidth(int textwidth) {
		this.textwidth = textwidth;
		return this;
	}

	public String getHint() {
		return hint;
	}

	public void setHint(String hint) {
		this.hint = hint;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public MBoolean getIshide() {
		return ishide;
	}

	public MItem setIshide(MBoolean ishide) {
		this.ishide = ishide;
		return this;
	}

	public MItem setIshide(boolean ishide) {
		this.ishide = new MBoolean(ishide);
		return this;
	}

	public MBoolean getIsedit() {
		return isedit;
	}

	public MItem setIsedit(MBoolean isedit) {
		this.isedit = isedit;
		return this;
	}

	public MItem setIsedit(boolean isedit) {
		this.isedit = new MBoolean(isedit);
		return this;
	}

}